/**
 * 
 */
package com.cvlep.appbase.message;

import com.cvlep.appbase.message.MessageClient;

/**
 * @author Otupia
 * 
 */
public class Message
{
	// destintion to send.
	private MessageClient sender;
	// destintion to send.
	private MessageClient receiver;

	// message body.
	private String messageBody;

	// Is confirm message demanded.
	private boolean receiptDemanded;

	// If send Failed try or not.
	private boolean retryIfFailed;

	public String getMessageBody()
	{
		return messageBody;
	}

	public void setMessageBody(String messageBody)
	{
		this.messageBody = messageBody;
	}

	public boolean isReceiptDemanded()
	{
		return receiptDemanded;
	}

	public void setReceiptDemanded(boolean receiptDemanded)
	{
		this.receiptDemanded = receiptDemanded;
	}

	public boolean isRetryIfFailed()
	{
		return retryIfFailed;
	}

	public void setRetryIfFailed(boolean retryIfFailed)
	{
		this.retryIfFailed = retryIfFailed;
	}

	public MessageClient getReceiver()
	{
		return receiver;
	}

	public void setReceiver(MessageClient receiver)
	{
		this.receiver = receiver;
	}

	public MessageClient getSender()
	{
		return sender;
	}

	public void setSender(MessageClient sender)
	{
		this.sender = sender;
	}

	public String toString()
	{
		StringBuffer sb = new StringBuffer();
		sb.append("{");
		sb.append("sender : " + this.getSender() + "/n");
		sb.append("receiver : " + this.getReceiver() + "/n");
		sb.append("message body : " + this.getMessageBody() + "/n");
		sb.append("receipt demanded : " + this.isReceiptDemanded() + "/n");
		sb.append("retry if failed : " + this.isRetryIfFailed() + "}");
		return sb.toString();
	}
}
